﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace ThoiTrangT2B
{
    public partial class UCProductBlock : System.Web.UI.UserControl
    {
        public void setValue(int ID, string img, string hang, string ten, string gia, string giacu, string khuyenmai)
        {
            this.ImgProduct.ImageUrl = img;
            this.lblHangProduct.Text = hang;
            this.lblProductLink.Text = ten;
            this.lblProductLink.NavigateUrl = "ChiTietSanPham.aspx?pID=" + ID;
            this.hplAll.NavigateUrl = "ChiTietSanPham.aspx?pID=" + ID;
            this.lblPriceProduct.Text = Convert.ToInt32(giacu).ToString("###,### VNĐ");
            this.lblOldPrice.Text = Convert.ToInt32(gia).ToString("###,### VNĐ");
            this.khuyenmai.Text = khuyenmai == "0" ? "" : "<p class='img-promotiontag'>" + khuyenmai + "% </p>";
        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}